Resource URL: /platform/<<version=1>>/quota/quotas/<QID>

    Overview: This resource applies the standard collection item pattern to
              individual OneFS quotas.  QID in the resource path is the quota
              ID.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve quota information.

       URL: GET /platform/<<version=1>>/quota/quotas/<QID>

Query arguments:
resolve_names=<boolean> If true, resolve group and user names in personas.
          zone=<string> Optional named zone to use for user and group
                        resolution.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "quotas": {
      "items": {
        "type": "object", 
        "properties": {
          "enforced": {
            "required": true, 
            "type": "boolean", 
            "description": "True if the quota provides enforcement, otherwise a accounting quota."
          }, 
          "include_snapshots": {
            "required": true, 
            "type": "boolean", 
            "description": "If true, quota governs snapshot data as well as head data."
          }, 
          "container": {
            "required": true, 
            "type": "boolean", 
            "description": "If true, SMB shares using the quota directory see the quota thresholds as share size."
          }, 
          "usage": {
            "required": true, 
            "type": "object", 
            "properties": {
              "logical": {
                "required": true, 
                "type": "integer", 
                "description": "Apparent bytes used by governed data."
              }, 
              "inodes": {
                "required": true, 
                "type": "integer", 
                "description": "Number of inodes (filesystem entities) used by governed data."
              }, 
              "physical": {
                "required": true, 
                "type": "integer", 
                "description": "Bytes used for governed data and filesystem overhead."
              }
            }
          }, 
          "thresholds": {
            "required": true, 
            "type": "object", 
            "properties": {
              "advisory": {
                "minimum": 1, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Usage bytes at which notifications will be sent but writes will not be denied.", 
                "required": true
              }, 
              "soft_last_exceeded": {
                "required": true, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Time at which soft threshold was hit"
              }, 
              "hard_last_exceeded": {
                "required": true, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Time at which hard threshold was hit."
              }, 
              "soft_exceeded": {
                "required": true, 
                "type": [
                  "boolean", 
                  "null"
                ], 
                "description": "True if the soft threshold has been hit."
              }, 
              "hard_exceeded": {
                "required": true, 
                "type": [
                  "boolean", 
                  "null"
                ], 
                "description": "True if the hard threshold has been hit."
              }, 
              "hard": {
                "minimum": 1, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Usage bytes at which further writes will be denied.", 
                "required": true
              }, 
              "advisory_last_exceeded": {
                "required": true, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Time at which advisory threshold was hit."
              }, 
              "advisory_exceeded": {
                "required": true, 
                "type": [
                  "boolean", 
                  "null"
                ], 
                "description": "True if the advisory threshold has been hit."
              }, 
              "soft_grace": {
                "minimum": 1, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Time in seconds after which the soft threshold has been hit before writes will be denied.", 
                "required": true
              }, 
              "soft": {
                "minimum": 1, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Usage bytes at which notifications will be sent and soft grace time will be started.", 
                "required": true
              }
            }
          }, 
          "linked": {
            "required": true, 
            "type": [
              "boolean", 
              "null"
            ], 
            "description": "For user and group quotas, true if the quota is linked and controlled by a parent default-* quota. Linked quotas cannot be modified until they are unlinked."
          }, 
          "notifications": {
            "enum": [
              "custom", 
              "default", 
              "disabled"
            ], 
            "type": "string", 
            "description": "Summary of notifications: 'custom' indicates one or more notification rules available from the notifications sub-resource; 'default' indicates system default rules are used; 'disabled' indicates that no notifications will be used for this quota.", 
            "required": true
          }, 
          "persona": {
            "required": true, 
            "type": [
              {
                "type": "object", 
                "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                "properties": {
                  "type": {
                    "enum": [
                      "user", 
                      "group", 
                      "wellknown"
                    ], 
                    "type": "string", 
                    "description": "Specifies the type of persona, which must be combined with a name."
                  }, 
                  "id": {
                    "type": "string", 
                    "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
                  }, 
                  "name": {
                    "type": "string", 
                    "description": "Specifies the persona name, which must be combined with a type."
                  }
                }
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "thresholds_include_overhead": {
            "required": true, 
            "type": "boolean", 
            "description": "If true, thresholds apply to data plus filesystem overhead required to store the data (i.e. 'physical' usage)."
          }, 
          "ready": {
            "required": true, 
            "type": "boolean", 
            "description": "True if the accounting is accurate on the quota.  If false, this quota is waiting on completion of a QuotaScan job."
          }, 
          "path": {
            "required": true, 
            "type": "string", 
            "description": "The /ifs path governed."
          }, 
          "type": {
            "enum": [
              "directory", 
              "user", 
              "group", 
              "default-user", 
              "default-group"
            ], 
            "type": "string", 
            "description": "The type of quota.", 
            "required": true
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "The system ID given to the quota."
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method PUT: Modify quota. All input fields are optional, but one or more must
            be supplied.

       URL: PUT /platform/<<version=1>>/quota/quotas/<QID>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "properties": {
    "thresholds": {
      "type": "object", 
      "properties": {
        "advisory": {
          "minimum": 1, 
          "type": [
            "integer", 
            "null"
          ], 
          "description": "Usage bytes at which notifications will be sent but writes will not be denied."
        }, 
        "soft_grace": {
          "minimum": 1, 
          "type": [
            "integer", 
            "null"
          ], 
          "description": "Time in seconds after which the soft threshold has been hit before writes will be denied."
        }, 
        "hard": {
          "minimum": 1, 
          "type": [
            "integer", 
            "null"
          ], 
          "description": "Usage bytes at which further writes will be denied."
        }, 
        "soft": {
          "minimum": 1, 
          "type": [
            "integer", 
            "null"
          ], 
          "description": "Usage bytes at which notifications will be sent and soft grace time will be started."
        }
      }
    }, 
    "enforced": {
      "type": "boolean", 
      "description": "True if the quota provides enforcement, otherwise a accounting quota."
    }, 
    "container": {
      "type": "boolean", 
      "description": "If true, SMB shares using the quota directory see the quota thresholds as share size."
    }, 
    "linked": {
      "type": "boolean", 
      "description": "If false and the quota is linked, attempt to unlink."
    }, 
    "thresholds_include_overhead": {
      "type": "boolean", 
      "description": "If true, thresholds apply to data plus filesystem overhead required to store the data (i.e. 'physical' usage)."
    }
  }
}

There is no response body for this method.

********************************************************************************

Method DELETE: Delete the quota.

          URL: DELETE /platform/<<version=1>>/quota/quotas/<QID>

There are no query arguments for this method.

There is no response body for this method.
